﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/SiteContent.Master" AutoEventWireup="true"
    CodeBehind="Realtime.aspx.cs" Inherits="Warehouse.Web.Inventory.Realtime" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .modulecontent li h2 {
            background: #ccf;
            padding-left: 10px;
        }
        .datatable {
            width: 100%;
        }
        .col_category {
            background: #ccf;
            text-align: center;
        }
        .col_category input {
            float: right;
            margin: 0 5px;
        }
        .col_category .categoryname {
            font-weight: bold;
        }
        .col_product_sn {
            width: 40px;
        }
        .col_product_name {
        }
        .col_spec_spec {
            width: 50px;
            text-align: center;
        }
        .col_spec_parkingspec {
            width: 50px;
            text-align: center;
        }
        .col_spec_unit {
            width: 30px;
            text-align: center;
        }
        .col_house {
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="moduleheader">
        <h4>
            实时库存</h4>
        <div class="moduleheadertoolbar">
            <input type="button" class="ui-button-refresh" onclick="window.location.reload();"
                value="刷新" />
        </div>
    </div>
    <div class="modulecontent">
        <table id="tablecategories" class="datatable">
            <tr>
                <th class="col_product_sn">
                    编号
                </th>
                <th class="col_product_name">
                    产品
                </th>
                <th class="col_spec_spec">
                    规格
                </th>
                <th class="col_spec_parkingspec">
                    包装规格
                </th>
                <th class="col_spec_unit">
                    单位
                </th>
                <asp:Repeater ID="rptHouseColumnHeader" runat="server">
                    <ItemTemplate>
                        <th class="col_house">
                            <%# Eval("Name") %>
                        </th>
                    </ItemTemplate>
                </asp:Repeater>
            </tr>
            <asp:Repeater ID="rptCategories" runat="server" OnItemDataBound="rptCategories_ItemDataBound">
                <ItemTemplate>
                    <tr>
                        <td class="col_category" colspan="<%= this.mWarehouses.Count+6 %>">
                            <span class="categoryname" categoryid="<%# Eval("ID") %>">
                                <%#Eval("Name")%></span>
                        </td>
                    </tr>
                    <asp:Repeater ID="rptProducts" runat="server">
                        <ItemTemplate>
                            <tr>
                                <asp:PlaceHolder ID="PlaceHolder1" runat="server" Visible='<%# Eval("FirstProduct") %>'>
                                    <td class="col_product_sn" rowspan='<%#Eval("ProductSpecificatoinCount")%>'>
                                        <%#Eval("Product.SerialNumber")%>
                                    </td>
                                </asp:PlaceHolder>
                                <asp:PlaceHolder ID="PlaceHolder2" runat="server" Visible='<%# Eval("FirstSpecification") %>'>
                                    <td class="col_product_name" rowspan='<%#Eval("SpecificatoinCount") %>'>
                                        <%#Eval("Product.Name")%>&nbsp;&nbsp;&nbsp;&nbsp;<%#Eval("Product.Grade")%>&nbsp;&nbsp;&nbsp;&nbsp;<%#Eval("Product.Model")%><br />
                                        <%#Eval("Product.Description")%>
                                    </td>
                                </asp:PlaceHolder>
                                <td class="col_spec_spec">
                                    <%# Eval("Specification.Specification")%>
                                </td>
                                <td class="col_spec_parkingspec">
                                    <%# Eval("Specification.PackagingSpecification")%>
                                </td>
                                <td class="col_spec_unit">
                                    <%# Eval("Specification.Unit")%>
                                </td>
                                <asp:Repeater ID="rptHouseColumn" runat="server">
                                    <ItemTemplate>
                                        <td class="col_house">
                                            <%# Container.DataItem %>
                                        </td>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </ItemTemplate>
            </asp:Repeater>
        </table>
    </div>
</asp:Content>
